-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Switches code linting to Ruff #4329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Greptile OverviewGreptile SummaryThis PR migrates from flake8 to Ruff for Python linting, but introduces several critical issues: Configuration IssuesIncomplete Migration: The PR claims to replace the linting setup with Ruff for "linting, formatting, and type-checking," but the actual implementation only migrates linting. The Version Inconsistency: Ruff is configured for Python 3.10 ( Critical Logic ChangesThis linting PR introduces multiple breaking changes that go beyond formatting:
Other Changes
Recommendations
Confidence Score: 1/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant PreCommit as Pre-commit Hooks
participant Ruff as Ruff Linter
participant Black as Black Formatter
participant Isort as Isort
participant Code as Codebase
Dev->>PreCommit: Commit changes
Note over PreCommit: Migration to Ruff
PreCommit->>Ruff: Run ruff --fix
Ruff->>Code: Apply linting fixes
Note right of Ruff: UP (pyupgrade)<br/>SIM (simplify)<br/>RET (return)<br/>F (pyflakes)<br/>E/W (pycodestyle)
Note over PreCommit: Still using Black + isort
PreCommit->>Black: Format code
Black->>Code: Apply formatting
PreCommit->>Isort: Sort imports
Isort->>Code: Reorder imports
Code-->>Dev: Code with mixed linting/formatting
Note over Code: Issues introduced:<br/>1. Logic changes in importer.py<br/>2. Breaking change in spaces.py<br/>3. Comparison reversals<br/>4. Python version mismatch
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 6 comments
Additional Comments (1)
The comment on line 12 says "TODO: Remove this once isort is removed from the project", but this contradicts the PR description which states the linting setup has been replaced with Ruff. Based on the |
Signed-off-by: Mayank Mittal <[email protected]>
# Description Ruff can handle linting, formatting, and type-checking (where applicable), streamlining our development workflow and improving code quality. This PR replaces our current linting setup with Ruff. Subsequent MRs will look into using Ruff for formatting and import ordering. ## Type of change - Documentation update ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Mayank Mittal <[email protected]>
Description
Ruff can handle linting, formatting, and type-checking (where applicable), streamlining our development workflow and improving code quality.
This PR replaces our current linting setup with Ruff. Subsequent MRs will look into using Ruff for formatting and import ordering.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there